package com.zx.oa.service.work;

import com.zx.oa.dao.work.WorkDao;
import com.zx.oa.dao.work.WorkDaoImpl;
import com.zx.oa.entity.CheckWork;
import com.zx.oa.entity.Work;

import java.util.List;

public class WorkServiceImpl implements WorkService {

    //数据访问层对象
    WorkDao workDao = new WorkDaoImpl();

    @Override
    public List<Work> getWorkList(String queryMajor, String queryClassName, int currentPageNo, int pageSize) {
        return workDao.getWorkList(queryMajor, queryClassName, currentPageNo, pageSize);
    }

    @Override
    public int getWorkTotalCount(String queryMajor, String queryClassName) {
        return workDao.getWorkTotalCount(queryMajor, queryClassName);
    }

    @Override
    public List<Work> getWorkMajorList() {
        return workDao.getWorkMajorList();
    }

    @Override
    public List<Work> getWorkClassNameList() {
        return workDao.getWorkClassNameList();
    }

    @Override
    public boolean upsetWork(CheckWork checkWork) {
        return workDao.upsetWork(checkWork);
    }

//    @Override
//    public List<Work> getWorkClassNameList(String selectMajor) {
//        return workDao.getWorkClassNameList(selectMajor);
//    }
}
